﻿using System;
using QFramework.Fullstack;
using TodoPro.Utility;

namespace TodoPro
{
    [Obsolete("已经过时了，使用新版本的 配置类",true)]
    public static class TodoProApp
    {
        public static IFrameworkLayer DomainLayer = new FrameworkLayer();
        public static IFrameworkLayer UtilityLayer = new FrameworkLayer();

        public static void ConfigLayers()
        {
            DomainLayer.Register<ITodoModel>(new TodoModel());

            UtilityLayer.Register<IStorage>(new DefaultStorage());
            UtilityLayer.Register<IJsonSerializer>(new DefaultJsonSerializer());
        }

        public static void Clear()
        {
            DomainLayer.Clear();
            
            UtilityLayer.Clear();
        }
    }
}